/*
 * error.h
 *
 * This file contains the error message strings for all of the framework's
 * possible errors which need to be displayed. They are separated by module and
 * allow the error messages to be selected based on language (as the original
 * author of this package only knows English, this functionality is available
 * but unused.
 */

#ifndef ROWGAGE_ERROR_H_
#define ROWGAGE_ERROR_H_

#include <stdlib.h>

#define printerr(...) fprintf(stderr, __VA_ARGS__)

/* Define our available languages */
#define LANGUAGE_ENGLISH 1

/* Defaults to English if ROWGAGE_LANGUAGE is not set */
#ifndef ROWGAGE_LANGUAGE
#define ROWGAGE_LANGUAGE LANGUAGE_ENGLIGH
#endif

/*
#if ROWGAGE_LANGUAGE == LANGUAGE_ENGLISH
*/

/* Controller-related error messages */
#define ERROR_CONT_ACTIONCREATE "ERROR: Attempted to create action from non-existant event or listener!\n"
#define ERROR_CONT_EVENTCREATE "ERROR: Failed to create event!\n"
#define ERROR_CONT_EVENTTCREATE "ERROR: Failed to create event type!\n"
/* Controller-related warning messages */
#define WARNING_CONT_NOSUCHACTION "WARNING: Attempted to activate a non-existant action!\n"
#define WARNING_CONT_REINIT "WARNING: Attempted to create controller when already initialized!\n"
#define WARNING_CONT_FREE "WARNING: Attempted to free controller before it was initialized!\n"
#define WARNING_CONT_ADD "WARNING: Attempted to add to controller before it was initialized!\n"
#define WARNING_CONT_INIT "WARNING: Controller not initialized!\n"
#define WARNING_CONT_EVENTFREE "WARNING: Attempted to free non-existant event!\n"
#define WARNING_CONT_LISTREG "WARNING: Attempted to register non-existant listener!\n"
#define WARNING_CONT_LISTFREE "WARNING: Attempted to free non-existant listener!\n"
#define WARNING_CONT_NOSUCHLIST "WARNING: Attempted to trigger non-existant listener!\n"
#define WARNING_CONT_TREINIT "WARNING: Attempted to create timed controller when already initialized!\n"
#define WARNING_CONT_TFREE "WARNING: Attempted to free timed controller before it was initialized!\n"
#define WARNING_CONT_TADD "WARNING: Attempted to add to timed controller before it was initialized!\n"

/* GUI-related error messages */
#define ERROR_GUI_NOTEXTURE "ERROR: Failed to draw texture, texture not found!\n"
#define ERROR_GUI_NOTEXINIT "ERROR: Failed to draw texture, texture list not initialized!\n"
/* GUI-related warning messages */
#define WARNING_GUI_REINITTEX "WARNING: Attempted to re-initialize stored texture information!\n"
#define WARNING_GUI_REINIT "WARNING: Attempted to re-initialize GUI!\n"
#define WARNING_GUI_CLOSE "WARNING: Attempted to close GUI before initializing!\n"

/* Lua-related error messages */
#define ERROR_LUA_OPENFAIL "ERROR: Failed to open script: %s\n"
#define ERROR_LUA_INITFAIL "ERROR: Lua script failed to initialize: %s\n"
#define ERROR_LUA_SCRIPTFAIL "ERROR: Lua script failed: %s\n"
#define ERROR_LUA_NOINIT "ERROR: Lua script uninitialized!\n"
#define ERROR_LUA_PKGNOINIT "ERROR: Attempted to create new package before Lua state was initialized!\n"
#define ERROR_LUA_ADDPKGINIT "ERROR: Attempted to add to a package before Lua state was initialized!\n"
#define ERROR_LUA_SETPKGINIT "ERROR: Attempted to set a package before Lua state was initialized!\n"
/* Lua-related warning messages */
#define WARNING_LUA_REINIT "WARNING: Attempted to re-initialize Lua state!\n"
#define WARNING_LUA_CLOSE "WARNING: Attempted to close Lua state before initializing!\n"

/*#endif * ROWGAGE_LANGUAGE == ... */

#endif
